package com.his.dao.domain;

/**
 * 医疗机构
 * @author sahala
 *
 */
public class MedicalInstit {
	private int id;
	
	/**
	 * 服务机构名称
	 */
	private String name;
	
	/** 服务范围 */
	private String serverLimit;
	
	/** 类型 */
	private int type;
	
	/**
	 * 省
	 */
	private String province;
	
	/** 市 */
	private String city;
	
	/** 县、区 */
	private String county;
	
	/** 详细 */
	private String detailAddr;
	
	/** 电话 */
	private String phone;
	
	/**  详细信息 */
	private String detaildesc;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getServerLimit() {
		return serverLimit;
	}

	public void setServerLimit(String serverLimit) {
		this.serverLimit = serverLimit;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public String getDetailAddr() {
		return detailAddr;
	}

	public void setDetailAddr(String detailAddr) {
		this.detailAddr = detailAddr;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getDetaildesc() {
		return detaildesc;
	}

	public void setDetaildesc(String detaildesc) {
		this.detaildesc = detaildesc;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	/**
	 * 得到完整地址信息
	 * @return
	 */
	public String getAddress(){
		StringBuilder sb = new StringBuilder();
		return sb.append(province).append(city).append(county).append(detailAddr).toString();
	}
	
	public String getTypeStr(){
		String typeStr = null;
		switch (type) {
		case 1:
			typeStr = "医院";break;
		case 2:
			typeStr = "社康站";break;
		case 3:
			typeStr = "专科医院";break;
		case 4:
			typeStr = "其他医疗机构";break;
		default:
			typeStr = "未知";break;
		}
		return typeStr;
	}
	
	
}
